<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/white/common/taglibs.jsp"%>
<%@include file="/white/common/common.jsp"%>

<html>
	<head>
		<script type="text/javascript">
	function toProdClassSel() {
		var url = ""

		url = "prodGroupAction!toProdClassSel.action";

		openWindow(url, 850, 500);
	}
function toManageRegionSel() {
				var url = ""

				url = "prodGroupAction!toManageRegionSel.action";

				openWindow(url, 850, 500);
			}
			function toManageRegionSelTree() {
				var url = ""

				url = "manageRegionAction!querySelByPageTree.action";

				openWindow(url, 850, 500);
			}
	function toProdClassSelTwo() {
		var url = ""

		url = "prodGroupAction!toProdClassSelTwo.action";

		openWindow(url, 850, 500);
	}

			function add() {
document.addform.submit();
	document.addform.addprodcustomer.disabled=true;
	}
	
	function update() {
document.updateform.submit();
	document.updateform.updatecustomer.disabled=true;
	}
	function oneClassonblur(obj){
		var code=obj.value;
		 var content_Type = "application/x-www-form-urlencoded;charset=UTF-8";
			jQuery.ajax({
			url : 'prodGroupAction!getProdClassByCode.action',
			type : "POST",
			contentType : content_Type,
			dataType : "text",
			data:{'class_code':code},
			error : function(textStatus, errorThrown) {
			},
			success : function(html) {
			$("#prodClassName1").val(html);
			}
		});
		
	} 
	function oneClass2onblur(obj){
		var code=obj.value;
		 var content_Type = "application/x-www-form-urlencoded;charset=UTF-8";
			jQuery.ajax({
			url : 'prodGroupAction!getProdClassByCode.action',
			type : "POST",
			contentType : content_Type,
			dataType : "text",
			data:{'class_code':code},
			error : function(textStatus, errorThrown) {
			},
			success : function(html) {
			$("#prodClassName2").val(html);
			}
		});
		
	} 	
</script>
	</head>
	<body>
<div id="change" style="display:block;">
		<div id="div_title">
			<h3>
				产品客户修改
			</h3>
		</div>


		<!-- Data Form -->
		<%@include file="/white/common/message.jsp"%>
		<s:form method="post" 
			action="prodCustomerAction-%{prodCustomer.id}!update" theme="simple" enctype="multipart/form-data" id="updateform">
			<s:token />
			<table cellpadding="0" cellspacing="0" class="t_form">

				<tr>
					<td width="15%">
						一级分类编号:
					</td>
					<td>
						<s:textfield id="prodClassCode1"
							name="prodCustomer.prodClassCode1" maxlength="64" onblur="oneClassonblur(this)" />
						<span class="red_star">*</span> &nbsp;&nbsp;一级分类名称:
						<s:textfield id="prodClassName1"
							name="prodCustomer.prodClassName1" maxlength="64" readonly="true" />
						<s:submit value=".." onclick="toProdClassSel();return false;"
							cssClass="input_button" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						二级分类编号:
					</td>
					<td>
						<s:textfield id="prodClassCode2"
							name="prodCustomer.prodClassCode2" maxlength="64" onblur="oneClass2onblur(this)" />
						<span class="red_star">*</span> &nbsp;&nbsp;二级分类名称:
						<s:textfield id="prodClassName2"
							name="prodCustomer.prodClassName2" maxlength="64" readonly="true" />
						<!-- <s:submit value=".." onclick="toProdClassSelTwo();return false;"
							cssClass="input_button" /> -->
					</td>
				</tr>
				<tr>
					<td width="15%">
						客户编号:
					</td>
					<td>
						<s:textfield name="prodCustomer.custId" maxlength="64" readonly="true" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						品牌编号:
					</td>
					<td>
						<s:textfield name="prodCustomer.groupId" maxlength="64" />
						
					</td>
				</tr>
				<tr>
					<td width="15%">
						客户名称1:
					</td>
					<td>
						<s:textfield name="prodCustomer.name1" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						客户名称首拼:
					</td>
					<td>
						<s:textfield name="prodCustomerUid.spName" maxlength="64" readonly="true" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						客户名称T9码:
					</td>
					<td>
						<s:textfield name="prodCustomerUid.t9Name" maxlength="64" readonly="true"/>
					</td>
				</tr>
				<tr>
					<td width="15%">
						客户名称2:
					</td>
					<td>
						<s:textfield name="prodCustomer.name2" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						区号:
					</td>
					<td>
						<s:textfield name="prodCustomer.areaCode" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						电话:
					</td>
					<td>
						<s:textfield name="prodCustomer.tel" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
						<tr>
					<td width="15%">
						分机:
					</td>
					<td>
						<s:textfield name="prodCustomer.telExt" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						列名次序:
					</td>
					<td>
						<s:textfield name="prodCustomer.listOrder" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						分列名:
					</td>
					<td>
						<s:textfield name="prodCustomer.subname1" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						地区代码:
					</td>
					<td>
						<s:textfield id="regionCode" name="prodCustomer.regionCode" maxlength="64" />
						<span class="red_star">*</span>
						<s:submit value=".." onclick="toManageRegionSelTree();return false;" cssClass="input_button" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						城市代码:
					</td>
					<td>
						<s:textfield id="cityCode" name="prodCustomer.cityCode" maxlength="64"/>
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						城市名称:
					</td>
					<td>
						<s:textfield id="cityName" name="prodCustomer.cityName" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						区域代码:
					</td>
					<td>
						<s:textfield  id="destrictCode" name="prodCustomer.destrictCode" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						区域名称:
					</td>
					<td>
						<s:textfield id="destrictName" name="prodCustomer.destrictName" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						地址:
					</td>
					<td>
						<s:textfield name="prodCustomer.addr" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						邮编:
					</td>
					<td>
						<s:textfield name="prodCustomer.zip" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Url:
					</td>
					<td>
						<s:textfield name="prodCustomer.url" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						微博:
					</td>
					<td>
						<s:textfield name="prodCustomer.weibo" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						微信:
					</td>
					<td>
						<s:textfield name="prodCustomer.weixin" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						易信:
					</td>
					<td>
						<s:textfield name="prodCustomer.yixin" maxlength="64" />
					</td>
					
				</tr>
				
				
				<tr>
					<td width="15%">
						来源:
					</td>
					<td>
						<s:textfield name="prodCustomer.source" maxlength="64" />
					</td>
					
				</tr>
					<tr>
					<td width="15%">
						360同步状态:
					</td>
					<td>
					
					<s:select list="kermanTypeMap" headerKey=""  headerValue=""
										name="prodCustomer.status360" id="prodCustomer.status360"
										value="prodCustomer.status360" >
						         </s:select>
						         
					
					</td>
					
				</tr>
				
					<tr>
					<td width="15%">
						114同步状态:
					</td>
					<td>
					<s:select list="kermanTypeMap" headerKey=""  headerValue=""
										name="prodCustomer.status114yp" id="prodCustomer.status114yp"
										value="prodCustomer.status114yp" >
						         </s:select>
					
					</td>
					
				</tr>
				<tr>
					<td width="15%">
						Logo:
					</td>
					<td>
					<img src="http://101.227.246.1/${prodCustomer.logo}">
					<br>
					<input type="file" name="upload" />
					
					</td>
				</tr>
				<!-- 
				<tr>
					<td width="15%">
						Logo:
					</td>
					<td>
						<s:textfield name="prodCustomer.logo" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						SafeStatus:
					</td>
					<td>
						<s:textfield name="prodCustomer.safeStatus" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						RegionName:
					</td>
					<td>
						<s:textfield name="prodCustomer.regionName" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						BxName:
					</td>
					<td>
						<s:textfield name="prodCustomer.bxName" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						PyName:
					</td>
					<td>
						<s:textfield name="prodCustomer.pyName" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						EngName:
					</td>
					<td>
						<s:textfield name="prodCustomer.engName" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						SpName:
					</td>
					<td>
						<s:textfield name="prodCustomer.spName" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						SourceId:
					</td>
					<td>
						<s:textfield name="prodCustomer.sourceId" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						ProdClassId:
					</td>
					<td>
						<s:textfield name="prodCustomer.prodClassId" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						ModifyTime:
					</td>
					<td>
						<s:textfield name="prodCustomer.modifyTime" label="日期"
							onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd', minDate:'1900-01-01',maxDate:''})"></s:textfield>
					</td>
				</tr>
				<tr>
					<td width="15%">
						ModifyEmpId:
					</td>
					<td>
						<s:textfield name="prodCustomer.modifyEmpId" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						InputTime:
					</td>
					<td>
						<s:textfield name="prodCustomer.inputTime" label="日期"
							onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd', minDate:'1900-01-01',maxDate:''})"></s:textfield>
					</td>
				</tr>
				<tr>
					<td width="15%">
						InputEmpId:
					</td>
					<td>
						<s:textfield name="prodCustomer.inputEmpId" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Id:
					</td>
					<td>
						<s:textfield name="prodCustomer.id" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Source:
					</td>
					<td>
						<s:textfield name="prodCustomer.source" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						Name2:
					</td>
					<td>
						<s:textfield name="prodCustomer.name2" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				
				<tr>
					<td width="15%">
						Subname2:
					</td>
					<td>
						<s:textfield name="prodCustomer.subname2" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						Subname3:
					</td>
					<td>
						<s:textfield name="prodCustomer.subname3" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						Subname4:
					</td>
					<td>
						<s:textfield name="prodCustomer.subname4" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						TelExt:
					</td>
					<td>
						<s:textfield name="prodCustomer.telExt" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						FaxFlag:
					</td>
					<td>
						<s:textfield name="prodCustomer.faxFlag" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						Sb:
					</td>
					<td>
						<s:textfield name="prodCustomer.sb" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Poix:
					</td>
					<td>
						<s:textfield name="prodCustomer.poix" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Poiy:
					</td>
					<td>
						<s:textfield name="prodCustomer.poiy" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						CustStatus:
					</td>
					<td>
						<s:textfield name="prodCustomer.custStatus" maxlength="64" />
					</td>
				</tr>
				<tr>
					<td width="15%">
						Zip:
					</td>
					<td>
						<s:textfield name="prodCustomer.zip" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						PyAddr:
					</td>
					<td>
						<s:textfield name="prodCustomer.pyAddr" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
				<tr>
					<td width="15%">
						EngAddr:
					</td>
					<td>
						<s:textfield name="prodCustomer.engAddr" maxlength="64" />
						<span class="red_star">*</span>
					</td>
				</tr>
 			-->
			</table>

			<div id="div_button">

<%-- 				<s:submit key="修改" id="updatecustomer"
					action="prodCustomerAction-%{prodCustomer.id}!update"
					onclick="if(validateForm()){return true;}else{return false;}"
					cssClass="input_button" /> --%>
				<input type="button" value="修改" onclick="update()" id="updatecustomer"
					action="prodCustomerAction-%{prodCustomer.id}!update"
					class="input_button" /> 
					<input type="button" value="返回"
					onclick="window.close();"
					class="input_button" />
					<s:submit value="另存"
						onclick="form.action='prodCustomerAction!toAdd.action';return true;"
						cssClass="input_button" />	
			</div>

			<s:hidden name="searchString" />

		</s:form>
</div>
		<!--Data Form End -->

	</body>

</html>